Skip to content

Conversation

@Alizter
Copy link
Collaborator

@Alizter Alizter commented Aug 29, 2025

In this PR, we enrich the cram test lexer with location information. In order to do this, we need to modify how lines are being lexed so that we can increment the line count correctly.

The tests introduced in #12334 give us some guarantees that we are preserving behaviour.

The motivation for this change is to allow for better error messages related to cram tests. For example, in a future PR we may enrich the timeout error with the exact location of the timed out command.

@Alizter Alizter force-pushed the cram-lex-loc branch 3 times, most recently from d77a6c4 to c2b1fe0 Compare August 29, 2025 16:47
@Alizter Alizter force-pushed the cram-lex-loc branch 2 times, most recently from 1b4f765 to 96bb60f Compare September 29, 2025 19:04
@Alizter Alizter force-pushed the cram-lex-loc branch 5 times, most recently from 611a0a5 to 84c47ad Compare October 29, 2025 23:05
@Alizter Alizter requested a review from rgrinberg October 29, 2025 23:06
@Alizter Alizter marked this pull request as ready for review October 29, 2025 23:06
We add support for lexing locations in cram tests.

Signed-off-by: Ali Caglayan <[email protected]>
@rgrinberg
Copy link
Member

Have you tried using these locations to improve any error messages yet? I'd like to see some work in that direction as this PR doesn't have any benefits on its own.

@Alizter
Copy link
Collaborator Author

Alizter commented Oct 30, 2025

@rgrinberg Yes, I've added locations to both the timeout and conflict error messages here: #12657

Once this is merged I will PR those changes separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants